#ifndef CONTROL_H
#define CONTROL_H

/* BUS2 output captured in a struct */
struct bus2_t{
    unsigned char type;      /* Read/Write */
    unsigned int size;       /* Number of words requested */
    unsigned int address;    /* Memory location */
    unsigned int rcount;     /* Number of registers accessed meanwhile */
    unsigned int icount;     /* Number of instructions accessed meanwhile */
};

class memory{
    public:
        int cycles;
        int cache;
        int misses;
        int conflicts;
        long bytes;
        float bandwidth;

        void process(bus2_t* line);
        void mem(bus2_t* line);
        void wrapup();
};

#endif